const thenFs = require('then-fs')
const path = require('path')
async function fn() {
  try {
    const data = await thenFs.readFile(path.join(__dirname, './files/a.txt'), 'utf8')
    await thenFs.writeFile(path.join(__dirname, './files/c.txt'), data, 'utf8')
    console.log('成功')
  } catch (error) {
    console.log('失败!' + error.message)
  }
}
fn()